package com.apes.framework.plugin.fsm;


import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;

public interface FsmStateInstanceTaskRepository extends CustomRepository<FsmStateInstanceTask, String> {

    List<FsmStateInstanceTask> findByFsmStateInstanceAndFinishedIsFalse(FsmStateInstance fsmStateInstance);
    List<FsmStateInstanceTask> findByNextTimeLessThanEqualAndFinishedIsFalseOrderByIdAsc(Date nextTime, Pageable pageable);

    List<FsmStateInstanceTask> findByFsmStateInstanceIdOrderByUpdateDateDesc(String fsmStateInstanceId);
}
